package com.dap.dao;

import java.io.Serializable;
import java.util.*;

import com.dap.dao.model.Order;


/**
 * 持久化对象基类
 * 
 */
public abstract class BasePo implements Serializable {
    private static final long serialVersionUID = 1406072669738004984L;

    /** 查询开始日期 */
    private Date queryBeginDate;

    /** 查询结束日期 */
    private Date queryEndDate;

    private Set<Long> includeIds;
    private Set<Long> excludeIds;

    /** 排序 */
    private List<Order> orderBy;

    private Map<String, Object> additionalParameter;

    private Integer pageIndex;
    private Integer pageSize;




    public Date getQueryBeginDate() {
        return queryBeginDate;
    }
    public void setQueryBeginDate(Date queryBeginDate) {
        this.queryBeginDate = queryBeginDate;
    }

    public Date getQueryEndDate() {
        return queryEndDate;
    }
    public void setQueryEndDate(Date queryEndDate) {
        this.queryEndDate = queryEndDate;
    }

    public Set<Long> getIncludeIds() {
        return includeIds;
    }
    public void setIncludeIds(Set<Long> includeIds) {
        this.includeIds = includeIds;
    }

    public Set<Long> getExcludeIds() {
        return excludeIds;
    }
    public void setExcludeIds(Set<Long> excludeIds) {
        this.excludeIds = excludeIds;
    }

    public final List<Order> getOrderBy() {
        return orderBy;
    }
    public final void setOrderBy(List<Order> orderBy) {
        this.orderBy = orderBy;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }
    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }



    public void addOrder(Order order) {
        if (orderBy == null) {
            orderBy = new ArrayList<Order>();
        }
        orderBy.add(order);
    }


    public Map<String, Object> getAdditionalParameter() {
        return additionalParameter;
    }


    public void putAdditionalParameter(String key, Object parameterValue) {
        if (additionalParameter == null) {
            additionalParameter = new HashMap<>(1);
        }
        additionalParameter.put(key, parameterValue);
    }

}
